#ifndef __PERSON_H__
#define __PERSON_H__
#include <iostream>
#include "Car.h"
#include "Tractor.h"
using namespace std;

class Person{
public:
    Person(string carName, string tracName, string name)
    :mTractor(tracName), mCar(carName), mName(name)
    {
        cout << "Person 带参构造函数！" << endl;
    }

    void GoWorkByCar(void){
        cout << mName << "开着 " << mCar.mName << "去上班 ！" << endl;
    }

    void GoWorkByTractor(void){
        cout << mName << "开着 " << mTractor.mName << "去上班 ！" << endl;
    }
    ~Person(){
        cout << "Person 析构函数！" << endl;
    }
private:
    string mName;
    Car mCar;
    Tractor mTractor;
};

#endif